package aip.core.model.user;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "USER_BASE")
public class User implements Serializable
{
    private static final long serialVersionUID = 8361103009027999523L;
    /** 用户名 */
    private String username;
    /** 显示名称（企业名称、用户姓名） */
    private String name;
    /** 密码 */
    private String password;
    /** 会员手机 */
    private String mobile;
    /** 创建时间 */
    private Date create;
    /** 最后修改时间 */
    private Date modify;

    /** 用户类型（管理员、专家用户、网站用户） */
    private String type;

    /** 账户状态（待审核、审核通过、审核退回） */
    private int state;

    /** 说明 */
    private String comment;

    /**
     * @return the username
     */
    @Id
    @Column(name = "USERNAME_")
    public String getUsername()
    {
        return username;
    }

    /**
     * @param username
     *        the username to set
     */
    public void setUsername(String username)
    {
        this.username = username;
    }

    /**
     * @return the name
     */
    @Column(name = "NAME_")
    public String getName()
    {
        return name;
    }

    /**
     * @param name
     *        the name to set
     */
    public void setName(String name)
    {
        this.name = name;
    }

    /**
     * @return the password
     */
    @Column(name = "PASSWORD_")
    public String getPassword()
    {
        return password;
    }

    /**
     * @param password
     *        the password to set
     */
    public void setPassword(String password)
    {
        this.password = password;
    }

    /**
     * @return the mobile
     */
    @Column(name = "MOBILE_")
    public String getMobile()
    {
        return mobile;
    }

    /**
     * @param mobile
     *        the mobile to set
     */
    public void setMobile(String mobile)
    {
        this.mobile = mobile;
    }

    /**
     * @return the type
     */
    @Column(name = "TYPE_")
    public String getType()
    {
        return type;
    }

    /**
     * @param type
     *        the type to set
     */
    public void setType(String role)
    {
        this.type = role;
    }

    /**
     * @return the state
     */
    @Column(name = "STATE_")
    public int getState()
    {
        return state;
    }

    public String getStateStr()
    {
        return String.valueOf(this.getState());
    }

    /**
     * @param state
     *        the state to set
     */
    public void setState(int state)
    {
        this.state = state;
    }

    /**
     * @return the create
     */
    public Date getCreate()
    {
        return create;
    }

    /**
     * @param create
     *        the create to set
     */
    public void setCreate(Date create)
    {
        this.create = create;
    }

    /**
     * @return the modify
     */
    public Date getModify()
    {
        return modify;
    }

    /**
     * @param modify
     *        the modify to set
     */
    public void setModify(Date lastUpdate)
    {
        this.modify = lastUpdate;
    }

    /**
     * @return the comment
     */
    @Column(name = "COMMENT_")
    public String getComment()
    {
        return comment;
    }

    /**
     * @param comment the comment to set
     */
    public void setComment(String comment)
    {
        this.comment = comment;
    }


}
